import axios from '../../axios.js';

const parkingList = {
    getAllParkings: function (params) {
        return axios({
            url: '/parkings/getAll',
            method: "get",
            params,
        })
    },
    getParkingsById: function (id) {
        return axios({
            url: '/parkings/getListById',
            method: "post",
            data: { id: id },
        })
    },
    //车位购买后的状态修改
    changeParkingState: function (id) {
        return axios({
            url: '/parkings/changeParkingState',
            method: "post",
            data: { id: id },
        })
    },
    //归还车位
    backParking: function (id) {
        return axios({
            url: '/parkings/backParking',
            method: "post",
            data: { id: id },
        })
    },
}
export default parkingList;